﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IntroduceCompany.Util
{
    public static class ConstantClass
    {

        #region General

        public const int _productImageHeight = 400;

        public const int _productThumbnailHeight = 160;

        public const int _articleThumbnailHeight = 100;

        public const int _albumThumbnailHeight = 200;

        public const int _randomPassLength = 6;

        public const String _LoginError = "/Views/Frontend/Home/Index.aspx";

       // public const String _Home_MenuID = "1"; do not delete

        public const int _Frontend_Video_MenuID = 15;

        // use in  BuildSiteMapPath ,AlbumController
        public const int _Frontend_Album_MenuID = 16;

        // use in languageModels BuildCultureChooserUserControl , Case "Survey": when click update btn in SurveyPage.aspx and build lang control
        public const int _Frontend_Survey_MenuID = 10; 

        // Currency Exchange Rates between VN and USD
        //public const double _currencyExchangeRates_VN_USD = 0.000048;

        /// <summary>
        /// pass to decrypt
        /// </summary>
        public const String _DecryptPass = "AH5P";

        /// <summary>
        /// return dateTime format to 23/09/2012 14:09:28
        /// </summary>
        public const String _dateTimeFormat = "{0:dd/MM/yyyy HH:mm:ss}";

        #endregion

        #region Validate

        public const String testNameOfMethod = @"^([a-zA-Z_])([0-9a-zA-Z_]?)+$";

        //Test Product Code abcde_0-1.11
        public const String testProductCode = @"^([a-zA-Z0-9])([_\.-]?[a-zA-Z0-9]){1,}$";

        //Test Member abcde_01.11-20
        public const String testMemberNameRegular_1 = @"^([a-zA-Z])([_\.-]?[a-zA-Z0-9]){5,19}$";

        // Test Email
        public const String testEmailRegular_1 = @"^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$";

        // ##### or +##.#### or ###.####.###### or +###.##### or ## ## ##.##.## or (##) ##.###.##
        public const String testPhoneRegular_1 = @"^([\+]{1})?([\(]([0-9]){1,}[\)][\s]?)?([0-9]([\s\.]{1}[0-9])?)+$";

        public const String testNameRegular_1 = @"^[a-zA-Z\s]+$";

        //  dd/MM/YYY or d/M/yyyy
        public const String testDate_1 = @"^(((0?[1-9]|[12]\d|3[01])\/(0?[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|[12]\d|30)\/(0?[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|1\d|2[0-8])\/0?2\/((1[6-9]|[2-9]\d)\d{2}))|(29\/0?2\/((1[6-9]|[2-9]\d)(0?[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$";

        // Float number
        public const String testCurrencyExchangeRate = @"^[0-9]\.?[0-9]+$";

        // Positive Integer (Price of produce)
        public const String testPositiveInteger = @"^(?!^0)\d{1,}$";

        //Language Code
        public const String testLanguageCode = @"^([a-zA-Z]){2,2}$";

        #endregion

        #region Cookie

        public const String cooLanguage = "cooLanguageID";
        public const int cooLanguageTimeLife = 1;

        public const String cooMenuType = "cooMenuType";
        public const int cooMenuTypeTimeLife = 1;

        public const String cooCart = "cooCart";
        public const int cooCartTimeLife = 1;
        public const String cooUrlContinueBuyProduct = "cooUrlContinueBuyProduct";

        //Cookie for drop down list Product Type in backend
        public const String cooProductType = "cooProductType";

        public const String cooArticleTypeID = "cooArticleTypeID";

        public const String cooOrderStatus = "cooOrderStatus";
        public const int cooOrderStatusTimeLife = 1;

        /// <summary>
        /// use in backend for making sure of the speed of web page always stable, by specifying a default amount of record loaded each page
        /// </summary>
        public const String cooAmount = "cooAmount";
        /// <summary>
        /// default amount of record
        /// </summary>
        public const String defaultAmount = "25";
        //keep the current page value in paging
      //  public const String cooCurrentPage = "CurrentPage";

        #endregion

        #region Language
        public const string mainLanguageID = "vi";
        //public const string mainLanguageCode = "vi";
        public const string markViewAllLanguage = "ViewAll";

        #endregion

        #region Paging
        public const int ArticlePageStep = 2;
        public const int AlbumPageStep = 4;
        public const int VideoPageStep = 2;
        public const int ProductPageStep = 2;

        #endregion

        #region Authorization

        public const string Backend_Menu_MenuID = "18";
        public const string Backend_AdminList_MenuID = "19";
        public const string Backend_Language_MenuID = "20";
        public const string Backend_Product_MenuID = "21";

        public const string Backend_Article_MenuID = "22";
        public const string Backend_Album_MenuID = "25";
        public const string Backend_Video_MenuID = "26";
        public const string Backend_CompanyInformation_MenuID = "27";

        //public const string Backend_CompanyMember_MenuID = "28";
        public const string Backend_BossEmail_MenuID = "29";
        public const string Backend_Feedback_MenuID = "30";
        public const string Backend_Survey_MenuID = "31";
        public const string Backend_Order_MenuID = "32";

        public const string Frontend_Home_MenuID = "1";
        public const string Frontend_Service_MenuID = "2";
        //public const string Frontend_Client_MenuID = "3";
        //public const string Frontend_Introduction_MenuID = "4";

        //public const string Frontend_News_MenuID = "5";
        public const string Frontend_Product_MenuID = "6";
        //public const string Frontend_Contact_MenuID = "7";
        //public const string Frontend_Feedback_MenuID = "8";

        //public const string Frontend_FAQ_MenuID = "9";
        //public const string Frontend_Survey_MenuID = "10";
        //public const string Frontend_Clothes_MenuID = "11";
        //public const string Frontend_Shoes_MenuID = "12";

        //public const string Frontend_History_MenuID = "13";
        //public const string Frontend_MissionStatement_MenuID = "14";
        public const string Frontend_Video_MenuID = "15";
        public const string Frontend_Album_MenuID = "16";

        //public const string Frontend_CareerOppotunity_MenuID = "17";
        public const string Frontend_JeanPants_MenuID = "23";
        public const string Frontend_BitisShoes_MenuID = "24";

        // role
        public const string superadmin = "1";
        public const string admin = "2";
        public const string totaladmin = "3";
        public const string infoadmin = "4";
        public const string productadmin = "5";

        //authorization
        public const String autMenu = superadmin;
        public const String autAdmin = superadmin + "," + admin;
        public const String autProduct = superadmin + "," + admin + "," + totaladmin + "," + productadmin;
        public const String autCompanyInformation = superadmin + "," + admin + "," + totaladmin;

        public const String autLanguage = superadmin;
        public const String autArticle = superadmin + "," + admin + "," + totaladmin + "," + infoadmin;
        public const String autVideo = superadmin + "," + admin + "," + totaladmin + "," + infoadmin;
        public const String autAlbum = superadmin + "," + admin + "," + totaladmin + "," + infoadmin;

        public const String autFAQ = superadmin + "," + admin + "," + totaladmin;
        public const String autSurvey = superadmin + "," + admin + "," + totaladmin;
        public const String autFeedback = superadmin + "," + admin + "," + totaladmin;
        public const String autMember = superadmin + "," + admin + "," + totaladmin;

        public const String autOrder = superadmin + "," + admin + "," + totaladmin;
        public const String autBossEmail = superadmin + "," + admin;
        // use in building backend menu.
        public const String author_menu_admin = "19,21,22,25,26,27";
        public const String author_menu_totalAdmin = "";
        public const String author_menu_infoAdmin = "21,22,25,26,27";
        public const String author_menu_productAdmin = "";

      //public const String productAdmin = "21,22,25,26,27";

        #endregion



    }
}